package com.daka.service.impl;

import com.daka.dao.PinganPlanbDao;
import com.daka.entity.PinganPlanb;
import com.daka.service.PinganPlanbService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author beliveli on 2016/3/31 0031.
 */
@Service("pinganPlanbService")
@SuppressWarnings("unused")
public class PinganPlanbServiceImpl implements PinganPlanbService {

    @Resource
    private PinganPlanbDao pinganPlanbDao;

    @Override
    public PinganPlanb selectByMobile(String mobile) {
        return pinganPlanbDao.selectByMobile(mobile);
    }

    @Override
    public PinganPlanb selectByCardNo(String cardNo) {
        return pinganPlanbDao.selectByCardNo(cardNo);
    }

    @Override
    public PinganPlanb updateById(PinganPlanb pinganPlanb) {

        pinganPlanbDao.updateByPrimaryKeySelective(pinganPlanb);

        return pinganPlanb;
    }

    @Override
    public PinganPlanb save(PinganPlanb pinganPlanb) {
        pinganPlanbDao.insert(pinganPlanb);
        return pinganPlanb;
    }
}
